﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Zjtz.aspx.cs" Inherits="Xiaov.SmartWeb.Application.HXZB.Zjtz" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>钻井台账</title>
    <script type='text/javascript' src='../../../SupCan/binary/dynaload.js?68'></script>
    <script type="text/javascript" language="javascript">
        function OnReady(id) {
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            var ddlyf = document.getElementById("ddl_Month");
            var yf = ddlyf.options[ddlyf.selectedIndex].value;   //获取月份
            if (id == "AF") {
                //  document.AF.func("Build", "Zjtz1.xml");
                document.AF.func("Build", "Zjtz.xml");
                document.AF.func("Load", "ZjtzData.aspx?nf=" + nf);
                //                form1.AF.func("SetSource", "ds1\r\nKantanData.aspx?nf=" + nf);
                //                form1.AF.func("Calc", "");
                //                form1.AF.func("SubscribeEvent", "Clicked");
                //                form1.AF.func("Swkrntpomzqa", "1,2,8,16,32,64,128");
            }
        }
        function OnEvent(id, Event, p1, p2, p3, p4) {
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            var ddlyf = document.getElementById("ddl_Month");
            var yf = ddlyf.options[ddlyf.selectedIndex].value;   //获取月份
            if (id == "AF" && Event == "Clicked" && p2 == "jh") {
                var jh = form1.AF.func("getCellText", p1 + "\r\n" + p2);
                window.open('Tzfx/Zjmx.aspx?nf=' + escape(nf) + '&yf=' + escape(yf) + '&jh=' + escape(jh), '', 'height=800,width=1020,top=100,left=100,toolbar=no,scrollbars,resizable=no,location=no');
            }
        }
        function query() {
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            document.AF.func("Load", "ZjtzData.aspx?nf=" + nf);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server" action="Zjtz.aspx" method="post">
    <div class="tools" style="height: 5%; width: 100%">
        <asp:DropDownList ID="ddl_Owner" runat="server" Visible="false">
        </asp:DropDownList>
        <asp:DropDownList ID="ddl_Year" runat="server">
        </asp:DropDownList>
        <asp:DropDownList ID="ddl_Month" runat="server">
        </asp:DropDownList>
        <input type="button" id="btn_query" value="查询" onclick="query();" />
        <%--  <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />--%>
        <asp:Button ID="btnGen" runat="server" Text="生成台账" OnClick="btnGen_Click" />
    </div>
    <div style="width: 100%" id="tree">
        <script language="javascript" type="text/javascript">
            insertTreeList('AF', '')
        </script>
    </div>
    <script type="text/javascript" language="javascript">
        var height1 = window.screen.height;
        var height = height1 * 0.62;
        document.getElementById("tree").style.height = height.toString() + "px";
    </script>
    </form>
</body>
</html>
